package com.qq.listener;

import com.qq.common.Baseinfo_user;
import com.qq.common.QcodeCreate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
/**
 * @desc 项目初始化
 * @author  yule
 * @create  2019/3/30
 **/
@Component
public class LoadListener implements ApplicationListener<ContextRefreshedEvent> {
    @Autowired
    private QcodeCreate create;
    @Autowired
    private Baseinfo_user userinfo;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        userinfo.loadinfo();
        create.init(0);
    }
}
